<?php
   include('./library/conn.php');
   $phonenum=$_REQUEST['phonenum'];

   $sql="select * from user where phonenum = $phonenum";

   $res = $conn->query($sql);
   $conn->close();

   if($row = $res->fetch_assoc()){
      $json=json_encode($row);
      echo $json;
   }

?>